Optimal. Leaf size=102 \[ \frac {4 e^{2 i a} x^{1+m} \left (c x^n\right )^{2 i b} \, _2F_1\left (2,-\frac {i (1+m)-2 b n}{2 b n};-\frac {i (1+m)-4 b n}{2 b n};-e^{2 i a} \left (c x^n\right )^{2 i b}\right )}{1+m+2 i b n} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 102, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {4605, 4601,
371} \begin {gather*} \frac {4 e^{2 i a} x^{m+1} \left (c x^n\right )^{2 i b} \, _2F_1\left (2,-\frac {i (m+1)-2 b n}{2 b n};-\frac {i (m+1)-4 b n}{2 b n};-e^{2 i a} \left (c x^n\right )^{2 i b}\right )}{2 i b n+m+1} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 371
Rule 4601
Rule 4605
Rubi steps
\begin {align*} \int x^m \sec ^2\left (a+b \log \left (c x^n\right )\right ) \, dx &=\frac {\left (x^{1+m} \left (c x^n\right )^{-\frac {1+m}{n}}\right ) \text {Subst}\left (\int x^{-1+\frac {1+m}{n}} \sec ^2(a+b \log (x)) \, dx,x,c x^n\right )}{n}\\ &=\frac {\left (4 e^{2 i a} x^{1+m} \left (c x^n\right )^{-\frac {1+m}{n}}\right ) \text {Subst}\left (\int \frac {x^{-1+2 i b+\frac {1+m}{n}}}{\left (1+e^{2 i a} x^{2 i b}\right )^2} \, dx,x,c x^n\right )}{n}\\ &=\frac {4 e^{2 i a} x^{1+m} \left (c x^n\right )^{2 i b} \, _2F_1\left (2,-\frac {i (1+m)-2 b n}{2 b n};-\frac {i (1+m)-4 b n}{2 b n};-e^{2 i a} \left (c x^n\right )^{2 i b}\right )}{1+m+2 i b n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(482\) vs. \(2(102)=204\).
time = 17.61, size = 482, normalized size = 4.73 \begin {gather*} \frac {x^{1+m} \sec \left (a+b \left (-n \log (x)+\log \left (c x^n\right )\right )\right ) \sec \left (a+b n \log (x)+b \left (-n \log (x)+\log \left (c x^n\right )\right )\right ) \sin (b n \log (x))}{b n}-\frac {(1+m) \sec \left (a+b \left (-n \log (x)+\log \left (c x^n\right )\right )\right ) \left (\frac {x^{1+m} \sec \left (a+b \log \left (c x^n\right )\right ) \sin (b n \log (x))}{1+m}-\frac {i e^{-\frac {(1+2 m) \left (a+b \left (-n \log (x)+\log \left (c x^n\right )\right )\right )}{b n}} \cos \left (a+b \left (-n \log (x)+\log \left (c x^n\right )\right )\right ) \left (-e^{\frac {a+2 a m+b (1+m) n \log (x)+b (1+2 m) \left (-n \log (x)+\log \left (c x^n\right )\right )}{b n}} (1+m+2 i b n) \, _2F_1\left (1,-\frac {i (1+m)}{2 b n};1-\frac {i (1+m)}{2 b n};-e^{2 i \left (a+b \log \left (c x^n\right )\right )}\right )+e^{\frac {a (1+2 m+2 i b n)}{b n}+(1+m+2 i b n) \log (x)+\frac {(1+2 m+2 i b n) \left (-n \log (x)+\log \left (c x^n\right )\right )}{n}} (1+m) \, _2F_1\left (1,-\frac {i (1+m+2 i b n)}{2 b n};-\frac {i (1+m+4 i b n)}{2 b n};-e^{2 i \left (a+b \log \left (c x^n\right )\right )}\right )-i e^{\frac {a+2 a m+b (1+m) n \log (x)+b (1+2 m) \left (-n \log (x)+\log \left (c x^n\right )\right )}{b n}} (1+m+2 i b n) \tan \left (a+b \log \left (c x^n\right )\right )\right )}{(1+m) (1+m+2 i b n)}\right )}{b n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.08, size = 0, normalized size = 0.00 \[\int x^{m} \left (\sec ^{2}\left (a +b \ln \left (c \,x^{n}\right )\right )\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int x^{m} \sec ^{2}{\left (a + b \log {\left (c x^{n} \right )} \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {x^m}{{\cos \left (a+b\,\ln \left (c\,x^n\right )\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________